package Test;

import core.JitBranch;
import gitobject.Branch;
import org.junit.Test;
import repository.Repository;

import java.io.IOException;

/**
 * @author shkstart
 * @create 2021-12-19 20:28
 */
public class BranchTest {
    @Test
    public void createBranch() throws Exception {
        Repository repository = new Repository("D:\\hashcode");
        Branch branch = JitBranch.branch("3");

        JitBranch.branch();
    }

    @Test
    public void getBrachLog() throws IOException {
        Repository repository = new Repository("D:\\hashcode");
        JitBranch.branch();
    }

    @Test
    public void deleteBranch() throws IOException {
        Repository repository = new Repository("D:\\hashcode");
        JitBranch.deleteBranch("3");
        JitBranch.branch();
    }

    @Test
    public void checkoutTest() throws Exception {
        Repository repository = new Repository("D:\\hashcode");
        JitBranch.checkout("master");
        JitBranch.branch();
    }


    @Test
    public void deleteObject() throws Exception {
        Repository repository = new Repository("D:\\hashcode");
        JitBranch.clear_work();
    }
}
